Repository navigation
fix(ios): keyboard dismiss never presses the return key - #4644
Conversation
Size Report
Startup median (7 runs, lower is better):
|
|
The change needs one more fix before merge: The replay 02-checkout-release.ad:12 fills Not blocking, take or leave: the strings in live-runner.ts around :379 and :419 (the comment, the step name "read email after dismiss", "should survive keyboard dismiss", "capture dismissed input keyboard", "dismissal changed pixels") still describe a dismiss that no longer happens; the help text in command-surface CI is still pending: all 15 non-passing jobs are queued or in progress, with no failure yet. Smoke Tests (ios) runs the changed |
|
Pushed 05f4467, addressing the review at 8ae4c31. Required: iOS routes that dismissed on
Optional items, applied
Verification (iPhone Air simulator, iOS 27.0,
|
One owner (RunnerKeyboardStatus.returnControl) decides which keyboard key is the return key. keyboard status reports it and keyboard dismiss excludes it, so a return key labelled Done is no longer pressed as a dismiss key and the form no longer submits. The iPad hide-keyboard key and a Done toolbar above the keys stay dismiss keys. Closes #4640 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The keyboard help now says keyboard enter submits, so "submit" in its search keywords repeats the description, which the search-keyword guard forbids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The checkout replays, the iOS perf form step and the test-app copy dismissed on a field whose only Done key is its return key, which keyboard dismiss now refuses. returnControl also ignores an accessory toolbar's button above the first key row. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Rebased onto main (#4642 changed the keyboard-key helper to On the rebased head, on the iPhone Air simulator (iOS 27.0,
|
05f4467 to
1831b06
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 4 new findings on 1831b06. The verdict and the full list are in the summary comment.
…n key One pure rule (RunnerKeyboardStatus.mayDismiss) admits a dismiss control from one keyboard snapshot: a hide-keyboard key always, a Done only when it is proven to be an accessory button above the character key rows. A failed read or a keyboard without a character-key anchor presses no Done. returnControl names a wording match only inside the key rows, so status and dismiss share the same band. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Apex Sentinel: 2 new findings on 5027d82. The verdict and the full list are in the summary comment.
|
The code-side asks from the earlier review (#4644 (comment)) are fixed at 5027d82, but the rewritten dismiss tap path has no live run yet. CI is nearly done: one review check is still open; Numeric Ranges and Coverage have passed. Smoke Tests (ios) passed on the merge of 5027d82 into 945b1f0 (b2c8e29) and ran smoke:form-input, which covers the dismiss refusal and keyboard enter on field-email. The runner keyboard XCUITests and the new unit tests were not run in CI, which executed 6 unrelated tests. There are no conflicts. The delta rewrote the live dismiss path in RunnerTests+Keyboard.swift. It reads one keyboard snapshot, admits controls through the new mayDismiss gate (character-row anchor, 80pt reach), drops the exists/isHittable check for in-keyboard controls, and taps a coordinate normalized to the keyboard frame. The device run in the PR body is from fc45a00, so nothing live shows a positive dismiss still lands at this head. A wrong offset, or a toolbar Done the anchor misjudges, would make dismiss refuse or tap the wrong spot on fields that dismissed before. Please run testKeyboardDismissPressesTheDoneToolbarNotTheDoneReturnKey, testKeyboardDismissNeverPressesADoneReturnKey and testKeyboardDismissTapsItsDismissKeyWhileTheAppIsBusy on an iOS simulator at 5027d82. Also run the Wallet password-field repro (it refuses and the form stays), and one positive dismiss through the CLI, via an accessory Done or the iPad Hide keyboard key, that shows dismissed: true and mechanism: dismissKey. Please post the outputs. Not blocking, and fine to take or leave: mayDismiss admits "Hide keyboard"/"Dismiss keyboard" without a frame check (RunnerKeyboardStatus.swift:97), so the descendants fallback can tap an app button with that label anywhere on screen, and the same 80pt reach as for Done would close that; the help text (packages/command-surface/src/system/index.ts:322 and commands.md:947) could add that when the key rows cannot be read, no Done is pressed and dismiss refuses with keyboard_dismiss_unavailable; and keyboardStatus could call the new readKeyboard (RunnerTests+Keyboard.swift:150), which repeats its iOS read, and map nil to visible: false. The four earlier inline threads no longer apply and can be resolved: the Done fail-closed case is fixed at 5027d82 (discussion_r4602599426), the 2pt return-control comparison is deleted (#4644 (comment)), the nine element queries are gone (#4644 (comment)), and the unanchored return-control case is fixed (#4644 (comment)). |
… its frame A snapshot control outside the keyboard's frame is tapped through its own element, never through a negative normalized offset. Hide-keyboard controls get the same reach check as Done, keyboardStatus reuses readKeyboard, and the help and commands.md state that an unreadable key row refuses. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Apex Sentinel: 1 new finding and 1 moved to a new line on 1382109. The verdict and the full list are in the summary comment.
The hide-keyboard key sat at iPad coordinates under a phone keyboard frame, so the reach check rightly refused it. The fixture now carries a matching keyboard frame. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…keys only A dismiss control is tapped through its live element, found uniquely by wording and type among the keyboard's controls, never through a coordinate from a snapshot the keyboard may have moved since; an ambiguous control refuses. The key-row anchor takes key-type controls only, so a one-letter QuickType candidate cannot pull it up to the prediction bar. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Live run at head Runner XCUITests ( The 23 pure return-key tests also pass on the macOS host lane ( Wallet password field (sign-up, focus in the password field, return key Positive dismiss on the runner fixture's accessory-Done screen ( The CLI sessions are closed. |
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on caf095a. The verdict and the full list are in the summary comment.
…control The keyboard, its key rows and any accessory Done are read from one app snapshot, so no decision compares a live frame with snapshot geometry. Eligible controls are tried in preference order and the first that is unique by type, label and identifier, in the snapshot and in one live lookup, is tapped; dismiss refuses only when none resolves. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Live re-check at head |
There was a problem hiding this comment.
Apex Sentinel: 2 new findings on 4e6fca1. The verdict and the full list are in the summary comment.
…ntifier as empty The live dismiss element must exist and be hittable; a covered control is passed over for the next eligible one and dismiss refuses when none is tappable. A control with no identifier is looked up by label alone, and a nil and an empty identifier are one thing in the uniqueness check. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks for the update. This review covers 4e6fca1; 0ef27cb landed while it ran and gets its own delta review. At 4e6fca1 the fail-closed anchor, the identity-based tap and the try-each loop are in, and the earlier concerns about frame matching and QuickType anchors are fixed. One regression remains, so this is not ready to merge yet. A sheet or form can show a navigation-bar Done while the focused field's input accessory toolbar also has a Done, with the same label and identifier. readKeyboardSurface collects dismiss-worded buttons from the whole app snapshot, and Not blocking, and you can take or leave it: Could one read of the keyboard's host window be simpler? Decide eligibility on it with the existing The required live evidence is in, but it is a prose summary at this head. The raw outputs are from caf095a, before the app-wide snapshot and the try-each loop landed. There are no conflicts. 20 of 21 checks pass and one is still in progress. CI does not run the runner keyboard XCUITests, so green checks will not cover this tap path. Before merge, fix the Done case and post a re-run of the toolbar dismiss at the new head. These open threads no longer apply, so please resolve them: r4602599426 (Done now fails closed with no anchor), r4602599446 (the 2pt frame comparison is deleted), r4602599457 (per-label queries are gone), r4602599474 (unanchored case returns false, covered by a test), r4602899825 (a Done above the key rows is admitted), r4603135385 (no snapshot-coordinate tap remains), r4603135399 (QuickType buttons no longer anchor), r4603368212 (eligibility comes from one snapshot), and r4603368661 (the tap loop tries the next control). |
…ntrol apart A navigation bar's Done with the same label and identifier no longer makes the toolbar Done ambiguous. Uniqueness is judged among controls near the keyboard, and the live lookup, which finds every control with that identity, takes the control by its position among them after a count check against the snapshot. The fixture's accessory screen carries a far-away Done to exercise it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Live re-check at head Wallet password field and the toolbar dismiss (the fixture screen has a screen-level The answer label Tests at this head: 31 of 31 on the simulator (including the toolbar, never-presses, covered-control, far-away-Done and busy tests) and 26 of 26 pure tests on the macOS host lane. Dismiss cost (refused
On the Wallet screen the app snapshot is faster than the keyboard snapshot plus the per-control queries it replaced. On Settings, the deepest screen I could drive, it costs about 35 ms more (roughly 9%). I did not measure a pathological tree such as the 65-level heavy feed, so a very deep tree may cost noticeably more; a failed or slow read still refuses and never presses. On iOS 27 the accessory toolbar and the keyboard are in different windows of the live tree (the toolbar's Done is in one window, the keyboard in another), so a read of the keyboard's host window cannot hold the toolbar. The app snapshot stays, and identity is now judged only among controls near the keyboard. |
|
Live results at head iPhone Air ( The fixture screens carry a screen-level iPad (A16, A first attempt returned Tests at this head: 30 of 30 on the iPhone Air, including the toolbar, plain-view accessory, never-presses and busy tests, and 24 of 24 pure tests on the macOS host lane. I did not add an automated iPad XCUITest: the nightly lanes select by device, and a test that skips on iPhone would not fit them, so the iPad hide key is covered by the pure fixture ( Refused-dismiss timing (CLI wall time per call, 8 calls per batch, two batches per build, iPhone Air; before = 82b24c6, after = 12c81e1):
No change, as expected: the read is the same whole-app snapshot. Diff size against the merge base: +665 −102 over 21 files (82b24c6 was +723 −93 over 16). The production Swift is small; most of the lines are tests and the device fixture. |
|
Reply to the Chief of Staff review at 82b24c6, fixed at Root cause fixed. Ownership is no longer scoped by element type. The Live lookup. Each candidate is looked up by identity, the matches kept are those near the keyboard, and it is tapped only when exactly one remains and it is hittable. Candidates are tried in preference order and dismiss refuses only when none qualifies. Also done: identifier-only controls stay candidates (an empty-label Tests. I removed the predicate-string assertion and the |
…ntract Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
CI on 12c81e1 failed |
This comment has been minimized.
This comment has been minimized.
When the whole-app snapshot succeeds but carries no keyboard node, as a tree too deep to serialize comes back, the keyboard's own read answers, so its hide-keyboard key is still pressed, and a refusal that finds nothing there carries details.cause tree_unreadable. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Live re-check at head iPhone Air ( iPad (A16, Tests at this head: 41 of 41 on the iPhone Air (the new fallback case, the toolbar and plain-view accessory tests, the never-presses and busy tests) and 34 of 34 on the macOS host lane (the whole models file plus the keyboard tests). The new case, The deep-tree fixture and the iPad cannot be combined here: the fixture host app is not installed on the iPad simulator, so the case where the app snapshot omits the keyboard and the iPad hide key is the only control is covered by that unit test, not live. |
This comment has been minimized.
This comment has been minimized.
|
@apex-sentinel-staging review |
|
Thanks for the update. At 4c0b069 the problem from my earlier review (#4644 (comment)) is fixed for every accessory shape, and I found no new problem in the code. This rests on the live plain-accessory, deep-tree and iPad outputs you posted. The plain-accessory CLI run is from 12c81e1. Its path is the same at 4c0b069 apart from the no-keyboard-node branch, and you report that the plain-view XCUITest passed at 4c0b069. An RN InputAccessoryView was not run, and the plain UIView + UIButton fixture stands in for it. That is fine, because the position rule does not depend on the element type. Not blocking, take or leave: at RunnerTests+Keyboard.swift:604, Do you need the The two earlier inline threads on the fallback (#4644 (comment)) and on the same-identity Done (#4644 (comment)) no longer apply. The first is fixed in 20 of 21 checks pass and one is still queued, not failed. CI does not run the runner keyboard XCUITests, so |
…miss candidate Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 4c0b069. The verdict and the full list are in the summary comment.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Live re-check at head |
This comment has been minimized.
This comment has been minimized.
|
Thanks for the update. At 5a1b7c0 the earlier code concerns are fixed, including the keyboard fallback in resolveKeyboardSurface (covered by KeyboardReturnKeyTests.swift:428-453), and one help claim is still wrong. All 21 CI checks pass, and there are no conflicts. The new help says that when the key rows cannot be read, dismiss refuses with The two other review threads do not need more work: the suite id one is intended, because the id keeps Android's history and suite.ts:304-307 documents the iOS shift (thread); the keyboard fallback one is fixed at this commit (thread). Please resolve both. CI does not run the runner keyboard XCUITests, so their result rests on your report. No live run reaches the new notFound branch, since that state cannot be produced on demand. It changes only the cause in the refusal, never what is tapped, so I do not count it against merge. Once the help text is fixed, nothing else stops this from merging. |
…ble key row Without a character-key anchor, dismiss refuses only a Done inside the keyboard; the hide-keyboard key and a Done accessory wholly above the keyboard still dismiss, as the classifier and its tests already require. The help and commands.md said dismiss refused outright. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Help-text fix from the review at 5a1b7c0 is in 5417b02. The `keyboard` help (`packages/command-surface/src/system/index.ts`) and `website/docs/docs/commands.md` now say that without a readable key row, dismiss refuses only a Done inside the keyboard, while the hide-keyboard key and a Done wholly above the keyboard still dismiss. That matches the classifier and the no-character-keys test; the classifier is unchanged. The MCP tool-loading guards, `check:doc-prose` and `check:command-docs` pass. The suite-id thread (intended) and the keyboard-fallback thread (fixed) are resolved. 🤖 Generated with Claude Code |
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
I reviewed 5417b02 and found no code problems. The help-text issue from the earlier review (#4644 (comment)) is fixed. The change since then touches one help string and one docs bullet, and no code route changed. All 21 checks pass, and there are no conflicts. The live runs posted earlier still cover the classifier, because this delta changes only text. No review threads are open. Nothing else needs to happen before merge. |
…g Return key (#4768) keyboard dismiss on iOS refuses a visible keyboard it cannot hide. On a search field the useful next step is usually Return, but the hint named only the Hide Keyboard key and a pan gesture. The refusal now reads the Return key its own status already observed and, for search, go, done and send, names keyboard enter and what it will do. Dismiss still never presses Return (#4644). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
keyboard dismisson iOS pressed a return key labelled "Done" as if it were a dismiss key, so the form submitted.RunnerKeyboardStatus.returnControlnow decides which key is the return key.keyboard statusreports it andkeyboard dismissexcludes it. The iPad hide-keyboard key and a "Done" toolbar above the keys stay dismiss keys. With no other dismiss key,dismissrefuses withkeyboard_dismiss_unavailable(dispatched: no).keyboard enterstill submits.10 files. The iOS e2e now asserts the refusal and uses
keyboard enterwhere it needed the field's submit to hide the keyboard. Help andcommands.mdsaydismissnever presses the return key. Closes #4640.Validation
Device: iPhone Air simulator, iOS 27.0 (
1B89356B-961C-4993-B0BE-4C0F3917D995), Wallet sign-up, focus in the password field (keyboard status:returnKey: done).1cb2f242ae:keyboard dismiss→dismissed: true, mechanism: dismissKey; app lands on Home ("Hi, Review").fc45a008b3:keyboard dismiss→success: false,KEYBOARD_DISMISS_UNAVAILABLE,reason: keyboard_dismiss_unavailable,dispatched: "no". The sign-up form stays, the password field is[focused], andkeyboard statusstill reports the keyboard visible.returnKey: next): refuses the same way at base and head.testKeyboardDismissNeverPressesADoneReturnKey,testKeyboardDismissPressesTheDoneToolbarNotTheDoneReturnKey,testKeyboardDismissTapsItsDismissKeyWhileTheAppIsBusy,testKeyboardEnterPressesReturnWhileTheAppIsBusy, and two pure return-key tests. With the exclusion disabled, the first two fail.pnpm typecheck,pnpm lint,pnpm check:xctest-selectionpass. The full gate is left to CI.Risk: the iOS simulator e2e edit in
live-runner.tswas not run live.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.